package huanzhao.erp.domain.enumerate.error;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author April
 * 2024/9/22 12:03
 * @version 1.0
 */
@Getter
@AllArgsConstructor
public enum ServiceError implements BaseErrorCode {
    SERVICE_ERROR(400, "服务异常"),

    REQUEST_LIMIT_EXCEEDED(401, "请求次数超出限制"),
    CONCURRENT_REQUEST_LIMIT_EXCEEDED(402, "请求并发数超出限制"),
    DUPLICATE_REQUEST(403, "用户重复请求"),
    REJECT_REQUEST(404, "服务器繁忙"),
    TOO_MANY_REQUESTS(429, "请求过于频繁"),

    WEBSOCKET_CONNECTION_ERROR(410, "WebSocket 连接异常"),
    WEBSOCKET_CONNECTION_CLOSED(411, "WebSocket 连接断开"),

    FAIL_TO_SEND_EMAIL(420, "邮件发送失败");
    private final int code;
    private final String message;

}
